package com.aka.tools.array 
{
	/**
	 * ...
	 * @author Huhanpeng
	 */
	public class DeleteRepetition 
	{
		public static function todo(classRef:Class,...arg):void
		{
			var j:int;
			var lastIndex:int;
			for (var i:int = 0; i < arg.length; i++) 
			{
				if ( !(arg[i] is classRef) ) 
				{
					throw new Error("数组" + i + "与类型不匹配");
				}
				
				j = 0;
				while ( j < ( arg[i] as classRef ).length - 1 ) 
				{
					lastIndex = ( arg[i] as classRef ).lastIndexOf( (arg[i] as classRef)[j] );
					if ( lastIndex != j ) 
					{
						( arg[i] as classRef ).splice( lastIndex, 1 );
					}
					else
					{
						j++;
					}
				}
			}
		}
		
	}

}